package com.huabo.system.service.impl;


import com.huabo.system.mysql.entity.TblAccBookMySql;
import com.huabo.system.mysql.mapper.TblAccBookMySqlMapper;
import com.huabo.system.oracle.entity.TblAccBook;
import com.huabo.system.oracle.mapper.TblAccBookMapper;
import com.huabo.system.service.TblAccBookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;

@Service
public class TblAccBookServiceImpl implements TblAccBookService {

    @Resource
    private TblAccBookMapper tblAccBookMapper;

    @Resource
    private TblAccBookMySqlMapper tblAccBookMySqlMapper;


    @Override
    public List<TblAccBookMySql> findBookIdByMySqlUserAll(BigDecimal staffid, BigDecimal orgid) {
        return this.tblAccBookMySqlMapper.listBySql(staffid, orgid);
    }

    @Override
    public List<TblAccBook> findBookIdByUserAll(BigDecimal staffid, BigDecimal orgid) {
        //return this.tblAccBookMapper.listBySql(staffid,orgid);
        return this.tblAccBookMapper.listBySql(staffid, orgid);
    }

    @Override
    public TblAccBook findByBookIdOne(String connectionstrings) {
//    	 return tblAccBookMapper.findByBookIdOne(connectionstrings);
        return tblAccBookMapper.findByBookIdOne(connectionstrings);
    }

    @Override
    public TblAccBookMySql findByMySqlBookIdOne(String connectionstrings) {
        return tblAccBookMySqlMapper.findByBookIdOne(connectionstrings);
    }

}
